perm filename CYCCAT[1,LMM] blob sn#031692 filedate 1973-03-28 generic text, type T, neo UTF8
(COMMENT CATALOG FUNCTIONS FOR CREATING CATALOG -- MUST BE RUN)

  (DE MAKECAT (TVC)
      (FOR NEW X IN TVC AS NEW J IS (CAR X)
           LIST
           (FOR NEW Y IN (CDR X)
                LIST
                (TRIVGRAPH J Y))))
)))))))))))))))))

  (DE TRIVGRAPH (J L)
      (PROG (S X Y LL N)
            (SETQ LL L)
            (SETQ S (SINGLERING J))
            (SETQ X (FOR NEW I := (J 1 -1)
                         XLIST I))
            (FOR X ON X AS L ON L DO (SETQ N
                                           (PLUS (CHORDLENGTH
                                                   (CAR L))
                                                 (CAR X)))
                 (CONNECT (FINDCTE (CAR X)
                                   S)
                          (FINDCTE N S))
                 (SETQ X (DELETE N X)))
            (RETURN (STRUCTURE FROM S UGRAPH = (CONS J LL)))))
)))))))))))))))))

  (DE CHORDLENGTH (X)
      (CDR (SASSOC X (QUOTE ((A . 1)
                             (B . 2)
                             (C . 3)
                             (D . 4)
                             (E . 5)
                             (F . 6)
                             (G . 7)
                             (H . 8)
                             (I . 9)))
                   NIL)))
)))))))))))))))))

  (GSET (QUOTE TRIVALENTCODES)
        (QUOTE ((2 (A))
                (4 (B B)
                   (A A))
                (6 (B C B)
                   (A A A)
                   (A B B)
                   (A C A)
                   (C C C))
                (8 (B C C B)
                   (B D D B)
                   (C E C C)
                   (A A A A)
                   (A A B B)
                   (A A C A)
                   (A B C B)
                   (A B D A)
                   (A C D B)
                   (A D D A)
                   (A E B B)
                   (A E C A)
                   (B B B B)))))
)))))))))))))))))

  (GSET (QUOTE LASTNODE)
        (QUOTE 0))
)))))))))))))))))

(GSET
     (QUOTE CATALOG-LIST)
      (MAKECAT TRIVALENTCODES)))
)))))))))))))))))